//
//  JiaoYiZheTableViewCell.m
//  DBAChain
//
//  Created by Evan on 2018/9/6.
//  Copyright © 2018 Evan. All rights reserved.
//

#import "JiaoYiZheTableViewCell.h"
#import "CommonData.h"
#import <Masonry.h>

@implementation JiaoYiZheTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    // Configure the view for the selected state
}

-(void)initUI{
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    self.backgroundColor = COLOR_Background_black;
    
    [self labelCNY];
    [self labelUp];
    [self labelUpDes];
    
    
}


-(UILabel*)labelCNY{
    if (!_labelCNY) {
        _labelCNY = [[UILabel alloc]init];
        [self addSubview:_labelCNY];
        [_labelCNY mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(self).offset(15);
            make.top.mas_equalTo(self).offset(10);
            make.height.offset(20);
            make.width.offset(140);
        }];
        _labelCNY.text = @"当前价格：1.1 CNY";
        _labelCNY.font = [UIFont fontWithName:@"PingFang-SC-Regular" size:15];
        _labelCNY.textColor = [UIColor whiteColor];
    }
    return _labelCNY;
}


-(UILabel*)labelUp{
    if (!_labelUp) {
        _labelUp = [[UILabel alloc]init];
        [self addSubview:_labelUp];
        [_labelUp mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(self).offset(15);
            make.top.mas_equalTo(self.labelCNY.mas_bottom).offset(10);
            make.height.offset(20);
            make.width.offset(45);
        }];
        _labelUp.text = @"涨幅：";
        _labelUp.font = [UIFont fontWithName:@"PingFang-SC-Regular" size:14];
        _labelUp.textColor = LCFromRGB(82, 89, 109);
    }
    return _labelUp;
}

-(UILabel*)labelUpDes{
    if (!_labelUpDes) {
        _labelUpDes = [[UILabel alloc]init];
        [self addSubview:_labelUpDes];
        [_labelUpDes mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(self.labelUp.mas_right).offset(0);
            make.top.mas_equalTo(self.labelUp);
            make.height.offset(20);
            make.width.offset(140);
        }];
        _labelUpDes.text = @"+10%";
        _labelUpDes.font = [UIFont fontWithName:@"PingFang-SC-Regular" size:14];
        _labelUpDes.textColor = LCFromRGB(107, 197, 143);
    }
    return _labelUpDes;
}


@end
